package struct;

/**
 *
 * @author Gabrielle DuBois
 */
public class Family extends DBObject{
    private final int numAttributes = 7;

    private String name;
    private String phone;
    private String head;
    private boolean donate;
    private boolean ministry;
    private String salut;
    private String notes;

    /**
     * 
     * @param familyName
     * @param primaryPhone
     * @param headOfHousehold
     * @param sendDonationLetter
     * @param sendVolunteerLetter
     * @param letterSalutation
     * @param additionalNotes
     */
    public Family(String familyName, String primaryPhoneNumber, String headOfHousehold,
                        boolean sendDonationLetter, boolean sendMinistryLetter,
                        String letterSalutation, String additionalNotes){
        super(7,2);
        attributes = new Object[numAttributes];
        attributes[0] = name = familyName;
        attributes[1] = phone = primaryPhoneNumber;
        attributes[2] = head = headOfHousehold;
        attributes[3] = donate = sendDonationLetter;
        attributes[4] = ministry = sendMinistryLetter;
        attributes[5] = salut = letterSalutation;
        attributes[6] = notes = additionalNotes;

    }//constructor

    /**
     * @see struct.DBObject
     * @return an Object array containing all the attributes that make up a
     *          family in the following order: familyName(String),
     *          primaryPhoneNumber(String), headOfHousehold(String),
     *          sendDonationLetter(Boolean), sendMinistryLetter(Boolean),
     *          letterSalutation(String), additionalNotes(String)
     */
    public Object[] getAttributes(){
        return attributes;
    }

    /**
     *
     * @return a String containing...
     */
    public String getLetterSalutation(){
        return salut;
    }
    
    /**
     *
     * @return a boolean containing...
     */
    public boolean getSendMinistryLetter(){
        return ministry;
    }

    /**
     *
     * @return a boolean containing...
     */
    public boolean getSendtDonationLetter(){
        return donate;
    }
    
    /**
     *
     * @return a String containing...
     */
    public String getHeadOfHousehold(){
        return head;
    }

    /**
     *
     * @return a String containing...
     */
    public String getAdditionalNotes(){
        return notes;
    }

    /**
     *
     * @return a String containing the family name
     */
    public String getFamilyName(){
        return name;
    }

    /**
     *
     * @return a String containing the primary phone number
     */
    public String getPrimaryPhoneNumber(){
        return phone;
    }

    /**
     * @see struct.DBObject
     * @return A String array containing the familyName in position 0
     *          and primaryPhoneNumber in position 1
     */
    public String[] getKey(){
        String[] key = new String[numInPrimaryKey];
        key[0] = name;
        key[1] = phone;

        return key;
    }//getKey()

}//Family
